<template>
  <div>
    <el-row :gutter="20">
      <el-col :span="9">
        <div class="grid-content bg-purple bgc1">
          <span class="title">工单统计 <i>2023.06.01~2023.06.30</i></span>
          <ul class="tasktongji">
            <li>{{ total }}<span>工单总数（个）</span></li>
            <li>{{ completedTotal }}<span>完成工单（个）</span></li>
            <li>{{ workerCount }}<span>进行工单（个）</span></li>
            <li>{{ cancelTotal }}<span>取消工单（个）</span></li>
          </ul>
        </div>
      </el-col>
      <el-col :span="9"
        ><div class="grid-content bg-purple bgc2">
          <ul>
            <li></li>
            <li>1</li>
          </ul>
        </div></el-col
      >
      <el-col :span="6"><div class="grid-content bg-purple bgc3"></div></el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'LikedeHome',
  components: {},
  data () {
    return {
      starTime: '',
      endTime: '',
      total: '',
      cancelTotal: '',
      completedTotal: '',
      workerCount: ''
    }
  },
  computed: {},
  methods: {},
  async created () {
    try {
      await this.$store.dispatch('layout/TaskReportAction', {
        starTime: '2023-06-01 00:00:00',
        endTime: '2023-06-30 23:59:59'
      })
      const [{ total, cancelTotal, completedTotal, workerCount }] =
        this.$store.state.layout.res
      this.total = total
      this.cancelTotal = cancelTotal
      this.completedTotal = completedTotal
      this.workerCount = workerCount
    } catch (error) {
      console.log(error)
    }
  }
}
</script>
<style lang="scss" scoped>
.el-header,
.el-footer {
  color: #333;
  text-align: center;
  line-height: 60px;
  height: 60px;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1999;
  background-image: url();
  background-size: cover;
  background-repeat: no-repeat;
  img {
    width: 88px;
    height: 36px;
    margin-top: 10px;
  }
}
.el-header {
  display: flex;
  justify-content: space-between;
  align-content: center;
  span {
    margin-right: 30px;
    color: #ffffff;
    img {
      width: 35px;
      height: 35px;
    }
  }
}

.el-aside {
  border: none;
  height: 1500px;
}

.el-main {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  line-height: 160px;
  padding: 20px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
.el-row {
  margin-bottom: 20px;
  &:last-child {
    margin-bottom: 0;
  }
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
::v-deep .bgc1 {
  background-image: url(),
    url(http://likede2-admin.itheima.net/img/task.66b715b7.png);
  background-repeat: no-repeat, no-repeat;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: calc(20vh - 24px);
  min-height: 166px;
  border-radius: 20px;
  ul {
    width: 3px;
    height: 300px;
    display: flex;
  }
}
::v-deep .bgc2 {
  background: #fbefe8
    url(http://likede2-admin.itheima.net/img/sale.606b0d8c.png) no-repeat
    calc(100% - 12px) 100%;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  height: calc(20vh - 24px);
  min-height: 166px;
  border-radius: 20px;
}
.bgc3 {
  -ms-flex-direction: column;
  flex-direction: column;
  height: calc(60vh - 72px);
  min-height: 458px;
  width: 300px;
  background: #e20606;
  border-radius: 20px;
}
* {
  list-style: none;
}

.tasktongji li {
  height: 50px;
  font-size: 36px;
  font-family: PingFangSC-Semibold, PingFang SC;
  font-weight: 600;
  line-height: 50px;
  text-shadow: 2px 4px 7px rgba(85, 132, 255, 0.5);
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.tasktongji li span {
  height: 17px;
  margin-top: 3px;
  font-size: 12px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #91a7dc;
  line-height: 17px;
  display: flex;
  flex-wrap: nowrap;
  width: 85px;
  margin-top: 40px;
}
.title {
  position: absolute;
  left: 20px;
  top: -50px;
}
</style>
